package org.dawn.deveco.plugin.resourceeditor.test;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Base64;

public class ImageFileByte {

    public static void main(String[] args) throws Exception {
        Path file = Path.of("E:\\Down\\HuaweiBrowser\\装载.png");
        byte[]  bytes  =Files.readAllBytes(file);
        String base64 = Base64.getEncoder().encodeToString(bytes);
        System.out.println(base64);

        byte[] aa = Base64.getDecoder().decode(base64);
        System.out.println(Arrays.compare(bytes, aa));
    }
}
